<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="custom" tagdir="/WEB-INF/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<link rel="stylesheet" type="text/css" href="/WEB-INF/css/stylesheet.css">
	<title>Remote Features</title>
</head>
	<body>
		<div class="body">
			<div class="topBar">
				<div id="pageTitle">
					Remote Features
				</div>
			</div>
			<custom:menuBar/>
			<div class="features">
				<table class="featuresTable">
					<tr>
						<td>
							Panic Mode - <div id="panicModeButton"><c:if test="${featureArray[0] != '2'}">
								<form method="POST" action="Features">
									<input type="hidden" name="featureName" value="panicMode"/>
									<c:choose>
										<c:when test="${featureArray[0] == '1'}">
											<input type="submit" value="Toggle On"/>
										</c:when>
										<c:when test="${featureArray[0] == '0' }">
											<input type="submit" value="Toggle Off"/>
										</c:when>
									</c:choose>
								</form>
							</c:if></div>
							<div id="locationLink"><a href="Locations">Locations</a></div>
						</td>
					</tr>
					<c:if test="${featureArray[1] != '2'}">
						<tr>
							<td>
								Screamer Mode - <form method="POST" action="Features">
									<input type="hidden" name="featureName" value="screamerMode"/>
									<c:choose>
										<c:when test="${featureArray[0] == '1'}">
											<input type="submit" value="Toggle On"/>
										</c:when>
										<c:when test="${featureArray[0] == '0' }">
											<input type="submit" value="Toggle Off"/>
										</c:when>
									</c:choose>
								</form>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[1] != '2'}">
						<tr>
							<td>
								WiFi - <form method="POST" action="Features">
									<input type="hidden" name="featureName" value="WiFi"/>
									<c:choose>
										<c:when test="${featureArray[0] == '1'}">
											<input type="submit" value="Toggle On"/>
										</c:when>
										<c:when test="${featureArray[0] == '0' }">
											<input type="submit" value="Toggle Off"/>
										</c:when>
									</c:choose>
								</form>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[1] != '2'}">
						<tr>
							<td>
								Bluetooth - <form method="POST" action="Features">
									<input type="hidden" name="featureName" value="bluetooth"/>
									<c:choose>
										<c:when test="${featureArray[0] == '1'}">
											<input type="submit" value="Toggle On"/>
										</c:when>
										<c:when test="${featureArray[0] == '0' }">
											<input type="submit" value="Toggle Off"/>
										</c:when>
									</c:choose>
								</form>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[1] != '2'}">
						<tr>
							<td>
								3G - <form method="POST" action="Features">
									<input type="hidden" name="featureName" value="3G"/>
									<c:choose>
										<c:when test="${featureArray[0] == '1'}">
											<input type="submit" value="Toggle On"/>
										</c:when>
										<c:when test="${featureArray[0] == '0' }">
											<input type="submit" value="Toggle Off"/>
										</c:when>
									</c:choose>
								</form>
							</td>
						</tr>
					</c:if>
					<c:if test="${featureArray[1] != '2'}">
						<tr>
							<td>
								4G - <form method="POST" action="Features">
									<input type="hidden" name="featureName" value="4G"/>
									<c:choose>
										<c:when test="${featureArray[0] == '1'}">
											<input type="submit" value="Toggle On"/>
										</c:when>
										<c:when test="${featureArray[0] == '0' }">
											<input type="submit" value="Toggle Off"/>
										</c:when>
									</c:choose>
								</form>
							</td>
						</tr>
					</c:if>
				</table>
			</div>
		</div>
	</body>
</html>